public class Test {
    public static void main(String[] args) throws BusException {
        Bus bus = new Bus(10);

        try{
            bus.takeOn(50);
            UseBusException ub1 = new UseBusException(Bus.countPeople);
            ub1.throwException();
        }catch (BusException b1){
            System.out.println(b1);
            try{
                bus.takeOff(20);
                bus.takeOn(10);
                UseBusException ub2 = new UseBusException(Bus.countPeople);
                ub2.throwException();
            }catch (BusException b2){
                System.out.println(b2);
            }

        }
        //bus.takeOn(50);
        //System.out.println("  "+Bus.countPeople);
    }
}
